package com.lizhipeng07.entity;
import java.util.Date;
public class Comment {
    private Integer id;
    private Integer userId;
    private Integer itemId;
    private String commentText;
    private Date commentDate;

    private User user;

    private Item item;

    public Comment() {}

    public Comment(Integer userId, Integer itemId, String commentText, Date commentDate) {
        this.userId = userId;
        this.itemId = itemId;
        this.commentText = commentText;
        this.commentDate = commentDate;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public String getCommentText() {
        return commentText;
    }

    public void setCommentText(String commentText) {
        this.commentText = commentText;
    }

    public Date getCommentDate() {
        return commentDate;
    }

    public void setCommentDate(Date commentDate) {
        this.commentDate = commentDate;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }
    @Override
    public String toString() {
        return "Comment{id=" + id + ", userId=" + userId + ", itemId=" + itemId +
                ", commentDate=" + commentDate + "}";
    }
}
